package com.taotao.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.taotao.common.pojo.PictureResult;
import com.taotao.service.PictureService;

@Controller
@RequestMapping("/pic")
public class PictureController {
	@Autowired
	private PictureService pictureService;

	@RequestMapping("/upload")
	public @ResponseBody PictureResult pictureUpload(MultipartFile uploadFile) {
		PictureResult pictureResult = pictureService.uploadPic(uploadFile);
		return pictureResult;
	}
}
